package org.onejava.plugin;
import org.onejava.core.bean.imp.IocPlugin;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringPlugin implements IocPlugin {
	ApplicationContext context;
	public Object getBean(String beanName){
		return context.getBean(beanName);	
	}
	public void inti(String xmlPath){
		context = new ClassPathXmlApplicationContext("classpath:"+xmlPath);
	}
}
